package com.oa.hyperion.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oa.hyperion.entity.Template;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface TemplateMapper extends BaseMapper<Template> {
    @Select("select id, name, creator, create_time, status from template where status = 'y'")
    List<Template> findAllTemplates();

    @Update("update template set status = 'n' where id = #{id}")
    void deleteTemplate(Integer templateId);
}
